import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;

public class TestFileHandle {

	private String outputText;
	private String inputText;
	private File saveFile;
	private File readFile;
	
	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		saveFile = new File("src//Test Cases (TXT)//TestFileHandlerOutput.txt");
		readFile = new File("src//Test Cases (TXT)//Al.test.01.txt");
		outputText = new String("TEST OUTPUT");
	}
	
	@Test
	public void testSimpleFileOutput() {
		try {
			FileHandler.createFile(saveFile, outputText);
		} catch (FileNotFoundException e) {
			System.out.println("EXCEPTION" + e.toString());
		} catch (IOException e) {
			System.out.println("EXCEPTION" + e.toString());
		}
	}
	
	@Test
	public void testSimpleFileInput() {
		inputText = FileHandler.readFile(readFile);
		System.out.println(inputText);
	}
}
